package com.haiyou.dc.string;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class StringTest {

    public static void main(String[] args) {
//        String str="abc";
//        char c = str.charAt(0);
//        System.out.println(c);
//
//        StringTest stringTest = new StringTest();
//        String name = stringTest.getClass().getSimpleName();
//        System.out.println(name);


//        MDC.put("test_uid","abc");
//        log.info("-------测试------->");

        String name = "尿素|血清尿素";


        String[] split = name.split("\\|");
        StringBuilder builder = new StringBuilder();
        for (String p : split) {
            if (builder.length() > 0) {
                builder.append(" or ");
            }
            builder.append(String.format(" name='%s' ", p));
        }
        builder.insert(0, String.format(" check_report_id=%d and  (", 11)).append(")");
        System.out.println(builder);

    }
}
